package com.dykj.fireFighting.web.base.video;

import com.dykj.fireFighting.api.base.video.dto.VideoLocalDto;
import com.dykj.fireFighting.api.base.video.entity.VideoLocal;
import com.dykj.fireFighting.api.base.video.service.IVideoLocalService;
import com.dykj.fireFighting.common.core.api.CommonResult;
import com.dykj.fireFighting.common.core.vo.LoginUserVo;
import com.dykj.fireFighting.common.core.vo.PageVo;
import com.dykj.fireFighting.web.base.shiro.ShiroUtil;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;


/**
 * 接口
 *
 * @Author JacksonTu
 * @Date 2022-04-08 09:53:27
 */
@Slf4j
@Api(value = "接口", tags = {"接口"})
@RestController
@RequestMapping("/videoLocal")
public class VideoLocalController {

    @DubboReference
    private IVideoLocalService videoLocalService;


    /**
     * 列表
     *
     * @return
     */
    @ApiOperation(value = "分页列表", notes = "分页列表")
    @GetMapping("/list")
    public CommonResult<PageVo<VideoLocal>> queryVideoList(VideoLocalDto videoLocalDto) {
        LoginUserVo loginUserVo = ShiroUtil.getUser();
        PageVo<VideoLocal> page = videoLocalService.queryVideoList(videoLocalDto, loginUserVo);
        return CommonResult.success(page);
    }


}
